const { createProxyMiddleware: proxy } = require("http-proxy-middleware");
module.exports = (app) => {
    //凡是以/api开头的请求,都会走proxy代理
 app.use(
 "/api",
 proxy({
 // 此处的端口号要与后期数据请求的数据端一致
 target: "http://cdf.yantianfeng.com/",
 changeOrigin: true,
 })
 );
};